import instance from "@/utils/http";

export const getCategoryAPI = (id) => {
  return instance({
    url: "/category",
    params: {
      id,
    },
  });
};
// 获取二级分类列表数据
export const getCategoryFilterAPI = (id) => {
  return instance.get("/category/sub/filter", { params: { id } });
};

// 获取导航数据
// data:{ categoryId:xx,page:1,pageSize:20,sortField:'publishTime' | 'orderNum','evaluateNum'}
export const getSubCategoryAPI = (data) => {
  return instance.post("/category/goods/temporary", data);
};
